package com.example.demofdfs.model;

import java.io.Serializable;
import java.util.Date;

@SuppressWarnings("serial")
public class UserLog implements Serializable {
	
	/**id自增*/
    private Integer id;
    /**用户代码*/
    private String userCode;
    /**登录ip*/
    private String loginIp;
    /**操作类型*/
    private Integer type;
    /**操作内容*/
    private String operation;
    /**备注*/
    private String remark;
    /**用户id*/
    private Integer userId;
    /**操作时间*/
    private Date createDate;
    
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	public String getUserCode() {
		return userCode;
	}
	public void setUserCode(String userCode) {
		this.userCode = userCode;
	}
	public String getLoginIp() {
		return loginIp;
	}
	public void setLoginIp(String loginIp) {
		this.loginIp = loginIp;
	}
	public Integer getType() {
		return type;
	}
	public void setType(Integer type) {
		this.type = type;
	}
	public String getOperation() {
		return operation;
	}
	public void setOperation(String operation) {
		this.operation = operation;
	}
	public String getRemark() {
		return remark;
	}
	public void setRemark(String remark) {
		this.remark = remark;
	}
	public Integer getUserId() {
		return userId;
	}
	public void setUserId(Integer userId) {
		this.userId = userId;
	}
	public Date getCreateDate() {
		return createDate;
	}
	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}
	
	public boolean isNew() {
		return id == null;
	}
	
	public void updateInfo(Integer userId) {
		if (this.isNew()) {
			this.createDate = new Date();
			this.userId = userId;
		}
	}
    
    
    
}